import { S } from '../../s';
import { IPSAppDEUIAction } from '../../app/dataentity/ipsapp-deuiaction';
import { IPSAppDataEntity } from '../../app/dataentity/ipsapp-data-entity';
import { IPSDEUIActionLogic } from './ipsdeuiaction-logic';
import { IPSDEUILogic } from './ipsdeuilogic';
import { IPSDEUILogicParam } from './ipsdeuilogic-param';
import { PSDEUILogicNodeImpl } from './psdeuilogic-node-impl';

export class PSDEUIActionLogicImpl
  extends PSDEUILogicNodeImpl
  implements IPSDEUIActionLogic
{
  protected dstpsappdeuiaction: IPSAppDEUIAction;
  getDstPSAppDEUIAction(): IPSAppDEUIAction | null {
    return (
      this.dstpsappdeuiaction ||
      (this.dstpsappdeuiaction = this.fillObjectModel(
        S._286,
        this.M.getDstPSAppDEUIAction,
        S._327,
      ) as IPSAppDEUIAction)
    );
  }

  protected dstpsappdataentity: IPSAppDataEntity;
  getDstPSAppDataEntity(): IPSAppDataEntity | null {
    return (
      this.dstpsappdataentity ||
      (this.dstpsappdataentity = this.fillObjectModel(
        S._f,
        this.M.getDstPSAppDataEntity,
        S._321,
      ) as IPSAppDataEntity)
    );
  }

  protected dstpsdeuilogicparam: IPSDEUILogicParam;
  getDstPSDEUILogicParam(): IPSDEUILogicParam | null {
    if (this.dstpsdeuilogicparam != null) return this.dstpsdeuilogicparam;
    const value = this.M.getDstPSDEUILogicParam;
    if (value == null) {
      return;
    }
    const ipsdeuilogic = this.getParentPSModelObject(S._206) as IPSDEUILogic;
    if (ipsdeuilogic != null) {
      this.dstpsdeuilogicparam = ipsdeuilogic.findPSDEUILogicParam(value);
    }
    return this.dstpsdeuilogicparam;
  }
  get cls(): string {
    return 'PSDEUIActionLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._1eb) return true;
    return super.instanceof(cls);
  }
}
